/*
	gravity.cpp

	Author: Chris Haag
	Description:

		Defines body of system that applies gravity in
		physics universe. Note how I instantiate gravity
		as it's own node in the linked list of our universe.		
*/
#include "gravity.h"

CGravity::CGravity()
{
	m_vAcc.x = 0;
	m_vAcc.y = -9.8f;
	m_vAcc.z = 0;
}

CGravity::CGravity(float xa, float ya, float za)
{
	m_vAcc.x = xa;
	m_vAcc.y = ya;
	m_vAcc.z = za;
}

void CGravity::Influence(CPSystem* p)
{
	// This code will make the force of gravity be
	// applied to our object p.
	p->m_vF += m_vAcc * p->m_Mass;
}

void CGravity::Action(CPSystem* p)
{

}

void CGravity::Reaction(float t)
{

}
